luci.mk: rework logic to determine current branch
authorJo-Philipp Wich <[email protected]>
Sat, 10 Sep 2022 12:54:25 +0000 (14:54 +0200)
committerJo-Philipp Wich <[email protected]>
Mon, 3 Apr 2023 11:45:03 +0000 (13:45 +0200)
commit4c2f249aada983d4a3e3153f92829e6a562eae9e
treeb3ba670b7084ab23e028811936fd16eaf72512bb
parent01dd586b18dffe0d0be5bdf9ecdf1e84d5810d5c
luci.mk: rework logic to determine current branch

In case `git branch --remote` yields no result, fall back to `git branch`
without `--remote` since it is possible that the local branch has not
been pushed yet.

Also simplify extraction of the branch name by not passing `--verbose`
and utilizing variable substitutions instead of sed expressions.

Signed-off-by: Jo-Philipp Wich <[email protected]>
(cherry picked from commit 447e362f0b56e5efdc2737899831297901736a0e)
luci.mk